home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-09 | 1.5 KB | 75 lines | [TEXT/PJMM] |
- program RotateStringPascal;
-
- uses
- RotateStringIntf;
-
-
- procedure DrawIT;
- var
- window1, window2: WindowPtr;
- RotatedStrMap: BitMap;
- WindowRect: Rect;
- err: OSErr;
- begin
-
- SetRect(windowRect, 100, 100, 200, 200);
-
- window1 := NewWindow(nil, windowRect, 'C-CW', true, noGrowDocProc, WindowPtr(-1), true, 0);
-
- SetPort(window1);
-
-
- TextFont(4);
- TextFace([bold, italic]);
- TextSize(96);
-
- err := RotateString('Rotate', RotatedStrMap, clockWise);
- if err <> noErr then
- begin
- DebugStr('Error rotating it');
- ExitToShell;
- end;
-
- SizeWindow(window1, RotatedStrMap.bounds.right, RotatedStrMap.bounds.bottom, false);
- SetPort(window1);
-
- CopyBits(RotatedStrMap, window1^.portBits, RotatedStrMap.bounds, RotatedStrMap.bounds, srcCopy, nil);
-
- OffsetRect(windowRect, (windowRect.right - windowRect.left) + 40, 0);
-
- window2 := NewWindow(nil, windowRect, 'CW', true, noGrowDocProc, WindowPtr(-1), true, 0);
-
- SetPort(window2);
-
-
- TextFont(4);
- TextFace([bold, italic]);
- TextSize(96);
-
- err := RotateString('Rotate', RotatedStrMap, clockWise);
- if err <> noErr then
- begin
- DebugStr('Error rotating it');
- ExitToShell;
- end;
-
- SizeWindow(window2, RotatedStrMap.bounds.right, RotatedStrMap.bounds.bottom, false);
- SetPort(window2);
-
- CopyBits(RotatedStrMap, window2^.portBits, RotatedStrMap.bounds, RotatedStrMap.bounds, srcCopy, nil);
- while not Button do
- ;
-
- end;
-
- begin
- InitGraf(@thePort);
- InitFonts;
- InitWindows;
- InitMenus;
- TEInit;
- InitDialogs(nil);
- InitCursor;
- FlushEvents(everyEvent, 0);
- DrawIT;
- end.